import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:字符串最后一个单词的长度
 * User: wangxin
 * Date: 2024-09-14
 * Time: 21:45
 */
public class test2 {
    public class Main {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            String str = in.nextLine();
            int len = str.substring(str.lastIndexOf(' ') + 1,str.length()).length();
            System.out.println(len);
        }
    }
}
